package com.adnaan.backend.common.model;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * author: adnaan
 * create: 2025-01-05 15:51
 * Description:
 */
@Data
@Schema(description = "分页请求参数")
public class PageParams<T> {

    @Schema(description = "页码")
    private int pageNo;

    @Schema(description = "每页数量")
    private int pageSize;

    @Schema(description = "查询参数")
    private T params;

    @Schema(hidden = true)
    public Page<T> getPage() {
        return new Page<>(pageNo, pageSize);
    }
}
